package com.zyl.blog.tasks.enums;

import lombok.Getter;

/**
 * @version v1.0
 * @ProjectName: Personal_Blog_Server
 * @Package: com.zyl.blog.tasks.enums
 * @ClassName: TaskStatusEnum
 * @Description:
 * @Author FinalFantasy
 * @Date 2025/8/12-09:55
 */
@Getter
public enum TaskStatusEnum {
    INITIALIZED(0, "初始化", false),
    RUNNING(1, "执行中", false),
    SUCCESS(2, "执行成功", false),
    FAILED(3, "执行失败", true),
    TIMEOUT(4, "执行超时", true),
    RETRYING(5, "重试中", false),
    CANCELLED(6, "已取消", false);

    private final int code;
    private final String desc;
    private final boolean isFailed;

    TaskStatusEnum(int code, String desc, boolean isFailed) {
        this.code = code;
        this.desc = desc;
        this.isFailed = isFailed;
    }
}